package com.aode.playlist.viewmodel;

import android.app.Application;

import androidx.annotation.NonNull;
import androidx.lifecycle.AndroidViewModel;
import androidx.lifecycle.MutableLiveData;

import com.aode.common.bean.response.Mllist;
import com.aode.common.bean.web.Result;
import com.aode.playlist.repository.Repository;

import java.util.List;

public class PlayListViewModel extends AndroidViewModel {
    private Repository repository;

    public PlayListViewModel(@NonNull Application application) {
        super(application);
        this.repository = new Repository(application);
    }

    public void getPlayList(){
        repository.getMllist();
    }
    public MutableLiveData<Result<List<Mllist>>> getPlaylistLiveData(){
        return repository.getMllistMutableLiveData();
    }
}
